public class NumberOf9 {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 1; i <= 100 ; i++) {
            if(i / 10 != 0){
                int tmp = i % 10;
                if(tmp == 9){
                    count++;
                }
                tmp = i / 10;
                if(tmp == 9){
                    count++;
                }
            }else{
                if(i == 9){
                    count++;
                }
            }
        }
        System.out.println(count);
    }
}
